package com.pf.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.util.concurrent.RejectedExecutionException;

/**
 * @author PanFei
 * @version 1.0.0
 * @createTime 2022/8/18 22:05
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    /**
     * 线程拒绝异常
     *
     * @param e
     * @return
     */
    @ExceptionHandler(value = RejectedExecutionException.class)
    public String RejectedExecutionException(RejectedExecutionException e) {
        e.printStackTrace();
        return "请稍候再试";

    }

}
